﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using QLHS2010;
using QLHS2010_BUS_WS.QLHS2010_DAL_WebService;

namespace QLHS2010_BUS_WS
{
    /// <summary>
    /// Summary description for QLHS2010_BUS_WebService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class QLHS2010_BUS_WebService : System.Web.Services.WebService
    {
        [WebMethod]
        public void insertHocSinh(HocSinhDTO info)
        {
            HocSinhCTL hsCTL = new HocSinhCTL();
            hsCTL.HocSinh = info;
            hsCTL.insert();
        }

        [WebMethod]
        public void deleteHocSinh(HocSinhDTO info)
        {
            HocSinhCTL hsCTL = new HocSinhCTL();
            hsCTL.HocSinh = info;
            hsCTL.delete();
        }

        [WebMethod]
        public void updateHocSinh(HocSinhDTO info)
        {
            HocSinhCTL hsCTL = new HocSinhCTL();
            hsCTL.HocSinh = info;
            hsCTL.update();
        }

        [WebMethod]
        public HocSinhDTO[] getDsHocSinh()
        {
            HocSinhCTL hsCTL = new HocSinhCTL();
            return hsCTL.getDsHocSinh();
        }

        [WebMethod]
        public LopDTO[] getDsLop()
        {
            LopCTL lopCTL = new LopCTL();
            return lopCTL.getDsLop();
        }
    }
}
